package com.example.demo.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.demo.entity.Type;
import com.example.demo.mapper.Typemapper;
import com.example.demo.service.Typeservice;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class Typeserviceimpl implements Typeservice {
    @Resource
    Typemapper typemapper;
    @Override
    public List<Type> selectAC() {
        return typemapper.selectList(null);
    }
    @Override
    public Page<Type> selecrA(Page<Type> page) {
        return typemapper.selectPage(page,null);
    }

    @Override
    public int insert(Type type) {
        return typemapper.insert(type);
    }

    @Override
    public Type sele(int id) {
        return typemapper.selectById(id);
    }

    @Override
    public int update(Type type) {
        return typemapper.updateById(type);
    }

    @Override
    public Type selea(int id) {
        return typemapper.selea(id);
    }

    @Override
    public int date(int id) {
        return typemapper.deleteById(id);
    }

    @Override
    public List selectApp() {
        return typemapper.selectApp();
    }
}
